<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.css">
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.js"></script>
  <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.js"></script>

  <title>Title</title>

  <style>
      #container {
          width: 900px;
          height: 540px;
      }
  </style>
</head>
<body>
<div>test gaode</div>
<div id="container"></div>

<script src="https://webapi.amap.com/maps?v=1.4.15&key=902851d861e6ae2e014f72b9f7beea8c"></script>
<script>
    var map = new AMap.Map('container', {
        resizeEnable: true, //是否监控地图容器尺寸变化
        zoom:11, //初始化地图层级
        center: [116.397428, 39.90923] //初始化地图中心点
    });

    map.on("complete", function(){
        alert("地图加载完成！");
    });
</script>
<!--<script>-->
<!--    window.onLoad = function () {-->
<!--        var map = new AMap.Map('container');-->
<!--    }-->
<!--    var url = 'https://webapi.amap.com/maps?v=1.4.15&key=902851d861e6ae2e014f72b9f7beea8c&callback=onLoad';-->
<!--    var jsapi = doc.createElement('script');-->
<!--    jsapi.charset = 'utf-8';-->
<!--    jsapi.src = url;-->
<!--    document.head.appendChild(jsapi);-->
<!--</script>-->

<div>test</div>

</body>
</html>
